Part Number Hot Search : 
D2037 2SC60 1N6315 AD8574AR 72V32 APTGT1 U123P 0N60B
Product Description
Full Text Search
 

To Download SNAD01C Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  SNAD01C 8-channel 8-bit adc ======== contents ======== 1. gene ral desc ription ............................................................................................................ .............. 3 2. features ....................................................................................................................... ............................ 3 3. appli c at ions ................................................................................................................... ......................... 3 4. block di agram .................................................................................................................. ..................... 4 5. pin assi gnments ................................................................................................................ ..................... 4 6. functional de scriptions ........................................................................................................ ..................... 5 6 . 1 . i n t e r f ac e format .......................................................................................................... ......................... 5 6 . 2 . c h a n n e l setting ........................................................................................................... ........................ 7 6 . 3 . c o n t r o l re gis t er s e tting .................................................................................................. .................... 7 6 . 4 . adc read timing ........................................................................................................... ..................... 8 6 . 5 . t i m i n g of digi t a l input reading ........................................................................................... ................ 9 6 . 6 . power down & channel wake-up .............................................................................................. ..... 10 6 . 7 . b a n d g a p referenc e ......................................................................................................... ................... 11 6 . 8 . input channel pad (channel 0~6) ........................................................................................... ........ 12 6 . 9 . b a t t e r y monitori ng (channel 7 only) ....................................................................................... .......... 13 7. electr i c a l ch arac te r isti c s ..................................................................................................... ... 14 8. appli c ation circuits ........................................................................................................... .............. 15 9. examp le programs ............................................................................................................... ............. 16 9 . 1 . program 1: set c onfiguration of sna d 01c .................................................................................. .. 23 9 . 2 . program 2: read ad c res u lt from channel 1 ................................................................................ 23 9 . 3 . program 3: read digital in put dat a from ch4, ch3, ch2 .............................................................. 23 9 . 4 . program 4: power-down s n ad 01c and hos t, and wake-up ........................................................ 23 9 . 5 . p r o g r a m 5: batte ry low detec t ion .......................................................................................... .......... 24 10. pad di agram .................................................................................................................... ...................... 26 version: 1.5 july 31, 2003 1
SNAD01C 8-channel 8-bit adc amendment history v e r s i o n d a t e d e s c r i p t i o n ver 1.1 february 12, 2003 first issue. ver 1.4 march 18, 2003 page3: wording modification in features list page8: modify table-3 control register setting pa ge 10 : mod i fy f i g u r e -1 0 page11: ?enters into power down mode at the 8 th clock cy cle? page11: more descript about power-down mode setting page24: add command ?@set_control_reg #0, #1, #0, #0? in demo program to make sure turn off rf & mb before power-down ver 1.5 july 31, 2003 1. add version code ?c? of chip no. 2. add one item in electrical characteristics 3. page23: mb=1 4. this spec is modified form snad01_v1.4 note: this document is used to identify the different version ?b? & ?c? of snad01, the most important is standby current and power down setting between version ?b? & ?c?. for the detail please refer to related section. version: 1.5 july 31, 2003 2
SNAD01C 8-channel 8-bit adc 1. general description SNAD01C is a low cost seria l 8- bit s a dc with 8 in dividua l inpu t cha nne ls. each chan n e l can be indep ende ntly programmed to a dig i t a l or a nalog input mod e . in the ana log input mo de, th is sing le- ended chan nel accepts an a nalog in put sign al fr om 0 to v ref and co n v erts the sig nal into 12-bit d i gital code s (w ith 8-bit a ccur a cy guaran teed ). in the dig i t a l inpu t mod e , th e chan n e l can be treated as digita l input po rt and the log i c leve l appe ars a t the ch annel ca n be acqu ire d . s n ad01c has a syn c hr onous 3-wire s ser i al inter f ace. th roug h this inte rfa c e, the host cpu can ea sily contro l SNAD01C. during a-to- d conver sio n , the typical current co nsu m ption is 50 0ua at 25 khz thr ough put -rate and +3v power supply. sna d 01c in clud es a pow er- down mode, which r edu ces maximum cur r ent consumption less than 1ua. the refe ren c e volta ge can be varie d between 1v and +v cc , providing a corre spo n d ing inpu t voltage ran g e of 0v to v re f . snad01 c also has a n on- ch ip 1.1 7 v ban dgap referen c e th at can be utilized for consta nt vo lta ge input (e specially fo r b a ttery monit o ring ap plica t ion s ). th e bandga p reference circuitry consumes 300 a@3v and can be enabled and disabled. 2. fea t ures ? ? ? ? ? ? ? single supply: 2.7v ~ 5.25v eight analog/digital input channels. internal 1.17v bandgap reference for battery monitoring. (channel 7) low power consumption: typical operating current: 500ua @ 3v, standby current <1ua. up to 25khz conversion rate. 12-bits adc with 8-bit effective number of bits 3-wire serial interface. 3. applica t ions ? ? ? ? ? ? ? battery-powered systems instrumentation portable data logging test equipment data acquisition process-control monitoring digital input bus extender version: 1.5 july 31, 2003 3
SNAD01C 8-channel 8-bit adc 4. block diagram 8-channels analog/digital input mux 12 bit sar adc serial interface and control logic vrh start clk dio avdd vdd d avss vssd ch0/di0 ch1/di1 ch2/di2 ch3/di3 ch4/di4 ch5/di5 ch6/di6 ch7(bat)/di7 1.2v bandgap reference figure-1 block diagram of adc 5. pin assignments pin name i/o description ch[7] ~ ch[0] i analog input / digital input ref i reference voltage of analog signal vdd i positive power v s s i n e g a t i v e p o w e r avdd i positive power of analog circuit avss i negative power of analog circuit start i command initialization signal (from host controller) clk i clock of dat a communicat i on an d ad conversion (fr o m host controller) dio io data input and output of data communication table-1 version: 1.5 july 31, 2003 4
SNAD01C 8-channel 8-bit adc 6. functional descriptions host cpu output port1 output port2 i/o port snad01 start clk dio start clk dio vdd avdd ref vdd ` vss avss ch[0] ch[1] ch[7] analog/digital signal 0.1u f figure-2 interface w i th host cpu 6.1. interface format channel setting control register setting hiz dio digital input reading power down clk start hiz dio hiz dio port input port output port input hiz dio port output port input port input figure-3 timing diagram of whole commands version: 1.5 july 31, 2003 5
SNAD01C 8-channel 8-bit adc (1) dio is hiz while start is high. (2) the interface logic begins to interpret a command at the falling edge of the start signal. (3) the command id (sent by host) is received in the first three clock cycles from dio. (4) the op erat io ns include c hanne l sett in g, adc rea d ing, dig i ta l input re adin g and power down. (5) dio becomes to hiz while start returns to high. command id operation 000 power down (0) 001 channel attribute setting (1:analog, 0:digital) 010 channel wakeup function setting (1:enable, 0:disable) 011 control register setting 1 0 0 a d c c o n v e r s i o n 101 digital input reading 1 1 0 r e s e r v e d 111 power down (1) table-2 command description table a. 000/111: adc enters into power down after receiving this command. b. 001: set the attrib ute o f e a ch chan nel to be a n ana log or a dig i ta l inp u t wit h th e seq uence of channel 7 to 0. (1:analog; 0:digital) c. 010: se t th e wakeup fun c tion of each channe l to be enabled o r d i sabled w i th t he seque nce of channel 7 to 0. (1:enable; 0:disable) d. 011: setting the values of control registers. e. 100: adc st arts to conv ert th e an alog sign al of the se lecte d ch anne l a f ter re ce iving this command. f. 101: adc st arts to re ad t he dig i ta l inp u t of every channe l with t he sequ ence of chann el 7 to 0. g. 110: adc enters into testing mode. version: 1.5 july 31, 2003 6
SNAD01C 8-channel 8-bit adc 6.2. channel setting figure-4 the timing diagram of channel attribute/w akeup setting clk start channel setting hiz cm2 cm1 cm0 ch[7] ch[6] ch[5] ch[4] ch[3] ch[2] ch[1] ch[0] x xx x x dio port input (1) command 001: channel attribute setting. (2) command 010: wakeup function setting. in at trib ute settin g , ? 1 ? m eans ana log and ? 0 ? mea n s dig i ta l. in wake up set t i ng, ?1? mea n s enab le and ?0? mea n s disab l e. after all of th e chann els a r e set, th e dio port remains inp u t mod e and all the following data are ignored. 6.3. control register setting clk start control register setting hiz cm2 cm 1 cm0 ph pl rf mb x x x x x xx x x dio port input figure-5 the timing diagram of control registers setting (1) command id: (011) (2) 4-bit dat a be hind command id are loa ded into co nt rol r egister s with t he seq uence of ph, pl, rf and mb. (3) the function of each control registers are as table-3. version: 1.5 july 31, 2003 7
SNAD01C 8-channel 8-bit adc n a m e f u n c t i o n ph set the pu ll-u p resistor o f t he chan nel in digital inpu t mode. 1:on, 0:off. pl set the pull-down resistor of the channel in digital input mode. ?1?: on, ?0?: off. rf, mb set the reference source (from internal bandgap or ?ref? pin) rf=0, mb=1: reference voltage from ?ref? pin rf=1, mb=0: reference voltage from internal bandgap table-3 note: 1. the condition of both ph=1 and pl=1 is prohibited. 2. pull-up a nd pull-d o wn resistor s ar e not a c ti vat ed while the corre spon ding cha nne l is set a s analog input m ode. 3. before into power down m ode, the ?rf ? and ?mb? register m u st set up ?0? , otherwise the standb y current will m o re than 1ua. 6.4 . adc read timing 0 0 id 2 id 1 id 0 1 hi z d7 d6 d4 d3 d5 d1 d0 d2 st a r t clk di o po r t i n p u t po r t o u t p u t xx t ac q xx pd s figure-6 the timing diagram of adc reading version: 1.5 july 31, 2003 8
SNAD01C 8-channel 8-bit adc (1) command id: (100) (2) 3-bit channel number data behind command id. (3) the analog sign al of th e se le cted ch annel is sa mpled to ad c. adc ref e rs the ref e r ence voltage an d converts t he sample d analog sig nal to d i git a l domain by succe ssive- approximation method. (4) the 8- bit ou tput data (re sult of conversion) of a dc is se nt t o dio por t f r om msb and i s trigg e red by clk. the m a ximum clock fre quen cy is 500 khz @ 2.7v. (maximum conversion rate=25khz) (5) after the 8-b i ts adc data has b een se nt out, if t he start is ke pt in low an d clk is kep t in high/low tra n sit i on , t hen the data wit h un certa i n value are kep t ap pear ing on dio. t h e se data can just be ignored. channel id[2:0] selected channel 0 0 0 c h 0 0 0 1 c h 1 0 1 0 c h 2 0 1 1 c h 3 1 0 0 c h 4 1 0 1 c h 5 1 1 0 c h 6 1 1 1 c h 7 table-4 channel selection table 6.5. timing of digital input reading clk start digital input reading hiz cm 2 cm 1 cm0 di[7] di[6] di[5] di[4] di[3] di[2] di[1] di[0] di[3] di[7] di[6] di[5] di[4] dio port output port input figure-7 the timing diagram of the digital input reading version: 1.5 july 31, 2003 9
SNAD01C 8-channel 8-bit adc (1) command id: (101). (2) the digital data of each channel is sent to the dio port with the sequence of channel 7 to 0. (3) after a ll of t h e ch anne ls a r e read , if th e start is ke pt in low an d clk is kep t in h i gh/low transition, t h e dig i ta l da ta of ea ch cha nnel is sen t t o the dio po rt aga in with the seque nce of channel 7 to 0 cyclically. (4) pulling start to high to terminates this digital input reading. note: once a ch anne l is programm ed as ana log type, th e corre spond ing dat a is ?0? in d i g i tal in put reading com m and. 6.6. pow e r dow n & channel wake-up 00 0 11 1 snad01 enters into power-down mode start clk dio dio figure-8 the timing diagram of pow er dow n command start clk ch n ch n dio dio wake-up host cpu hiz hiz wake-up procedure ending figure-9 the timing diagram of pow er dow n command version: 1.5 july 31, 2003 10
SNAD01C 8-channel 8-bit adc (1) the power d o wn command (000/1 11) is sen t to SNAD01C in the fir s t three cycle s , and t hen SNAD01C enters into po wer down mode at t he 8 th clo ck cy cle , cons um ing a l m o st no curr ent (less than 1ua). (2) after SNAD01C enter s p o wer down ( m ode 0: co mmand 000) , SNAD01C send s ?0? ou t to dio until a valid log i c tra n s it ion ap pear s on any wakeup- enab le d digital input channe l. once the tran sit i on occur s , SNAD01C tog g les dio to ?1 ? to inform h o st co ntro ller . after re ceiving ?1? from dio , host contro ller sh ould t u rn start back to ?1? t o inf o rm SNAD01C that the power-down stage is over . othe rwise, SNAD01C keeps se ndin g out ?1? to d i o and doe s not recognize any other transitions on any channels. (3) after SNAD01C enter s p o wer down ( m ode 1: co mmand 111) , SNAD01C send s ?1? ou t to dio until a valid log i c tra n s it ion ap pear s on any wakeup- enab le d digital input channe l. once the tran sit i on occur s , SNAD01C tog g les dio to ?0 ? to inform h o st co ntro ller . after re ceiving ?0? from dio , host contro ller sh ould t u rn start back to ?1? t o inf o rm SNAD01C that the power-down stage is over . othe rwise, SNAD01C keeps se ndin g out ?1? to d i o and doe s not recognize any other transitions any the channels. (4) the clk ma y stop but st art ought t o remain at l o w level in t he who l e p o w er down m ode. (5) the SNAD01C provides two powe r-down mode ?power_down 0? and ?power_down 1?, user has to select a property power -down mode that it depend on what ki nd i/o type for host mcu (pul l-up or pull-low) before adc enter power-dow n mode. otherwise, it will gener ate a dc-path and the standby current also will go up. (6) before into power down mode, the ?rf? and ?mb? register must se t up ?0?, otherwise the standby current will more than 1ua. note: wakeu p f unction is only d edicated to t he chan nel w h ich is digita l input t y pe a nd wakeup - enabled. 6.7. bandgap reference vdd vss ref pad to refere nce hi gh of the adc rf mb 1.2v bandgap r e ference on chip of f chip figure-10 circuit diagram of adc bandgap reference selection version: 1.5 july 31, 2003 11
SNAD01C 8-channel 8-bit adc if the inter n a l band gap r e feren c e is tu rned on (rf=1), th e ref e rence volta ge ?vref? o f adc is from the int e rnal ban dg ap ref e ren c e cir c u i t. this int e rna l volt age re feren c e circu i t con s umes around 300 a, and the output voltage of bandgap reference is around 1.17v typically. if rf is turn ed of f (rf=0 ) , the mb is t u rned on (mb=1), th e re f e rence volt a ge is from ? r ef? pin . otherwise, the reference voltage source is comes from internal bandgap if rf=1 & mb=0. 6.8. input channel pad (channel 0~6) vdd vss ench[x] to adc di[x] ch[x] ench[x] pull-high resistor pull-low resistor ench[x]: 1: analog in / 0: digital in ph&ench[x] pl&ench[x] figure-11 circuit diagram of the input channel pad (1) if any chann el is progra mmed to be analog inpu t mode, t h e n the corr esponding inte rna l signal, ench[x]=1. as in figu re-11, pull-high and pull-low ar e disabled. and the path to digital input is blocked. all digital reading operation of this channel will get the result ?0?. (2) if any cha n n e l is prog ra mmed to dig i tal inp u t mode, the n the corre spon din g inter nal sig nal, ench[x]=0. as in figure-11, the path to adc is removed. (3) while in d i g i t a l inpu t mod e , th is input port ca n be conf igure d t o be flo a ting, weak pull-up , or pull-down by sett ing the contr o l r egist er ph and pl, where p h &pl=1 is f o rbid den. t he pull-up or pull-low resister are both around 500k ? @3v. (4) the d e fau l t status (d ig ital/ analo g , pull up/down) of all the chann els are un -kn o w aft e r p o wer on, so initialize each channel to define a correct state should be done after power on. (5) mode of each channel (ench[x]) can be set by command 001. version: 1.5 july 31, 2003 12
SNAD01C 8-channel 8-bit adc 6.9. battery monitoring (channel 7 only ) ench[7] to adc di[7] vss 20k 10k 30k vss battery ench[7] vdd vss ch[7] ph&ench[x] pl&ench[x] figure-12 the circuit of the input pad of channel 7 (1) while re ad adc command is sen t a n d chann el 7 is sele cte d , ad c can be u s e d to monit o r t he battery voltage. (2) the circuit of battery voltage monitoring is shown in figure-12 (channel7 only) (3) the ba ttery voltag e is six times adc measur ing vo lt age. t hus, t he measur ed resu lt e qua ls to 1/6*battery voltage. (4) while ch ann el 7 is set to t he ana log in put mode, a n input resist o r (60k ? ) exists from ch[7 ] to vss. to save unnecessary power consumption, ch[ 7] should be switch to digital input t y pe when ch[7] is not measured. note: ch[7] is different from the other 7 channels. the input voltage is reduced to 1/6 before it is sent into adc. version: 1.5 july 31, 2003 13
SNAD01C 8-channel 8-bit adc 7. electrical characteristics typical values apply for v dd =v ref =3.0 v, t amb =25 c unless otherwise noted. sy m b o l p a r a m e t e r m i n ty p m a x u n i t c o n d i t i o n s analog-to-digital converter v dd o p e r a t i n g v o l t a g e 2 . 7 3 . 0 5 . 2 5 v i dd o p e r a t i n g c u r r e n t 4 0 0 a exclu d i ng ba n d g ap ref e ren c e and control register?s rf is set up 0 . v dd = 3 .0v i pdn power down current 0.1 a v dd = 3 .0v f sm p c o n v e r s i o n r a t e (throughput rate) 3 0 40 khz v dd = 3 .0v v dd = 5 .0v d n l d i f f e r e n t i a l n o n l i n e a r i t y 0 . 5 l s b i n l i n t e g r a l n o n l i n e a r i t y - 0 . 5 l s b nmc no missing code 8 bits v dd =2. 7 ~5. 25v sinad signal to noise and distortion 5 0 db enob effec t ive number of bits 8 bits bandgap reference vbg bandgap reference output voltage 1 . 1 4 1 . 1 7 1 . 2 0 v ibg operating current of bgr 400 a digital interfac e weak pull up/down resistance 5 0 0 k ? v dd =3v output drive/sink current of dio 3 ma v op =v dd -0.5v / v ss +0. 5 v version: 1.5 july 31, 2003 14
SNAD01C 8-channel 8-bit adc 8. applica t ion circuits example circuit: SNAD01C w o rks w i th sonix 4-bit series controller ch[0], ch[1], ch[2]: analog input ch[6]: digital input ch[7]: battery voltage detect ref=vdd+ 4-bit voice chip p22 snad02 start clk dio vdd avdd ref vdd ` vss avss ch[0] ch[1] ch[7] analog signal 0.1u f vdd p21 p20 vss sn100/300/500 sn66/67/68/6a analog signal ch[2] analog signal ch[6] vdd figure-13 SNAD01C works with sonix 4-bit series controller version: 1.5 july 31, 2003 15
SNAD01C 8-channel 8-bit adc 9. example programs host controller: snc500. applic ation ci rcuit i s identical to fi gure11. p22: sta r t. p21: clk. p20: dio. macro programs: (def.h) i p2state equ m0 port_l equ m1 port_h equ m2 ad_out_l equ m3 ad_out_h equ m4 tmp equ m5 tmp1 equ m6 ad_hh equ m7 ;;******************************** @on_st art macro ;;set st art = 0 mov a #1011b and a p2state mov p2state a mov p2 a endm ;;******************************** @off_st art macro ;;set st art = 1 mov a #0100b or a p2state mov p2state a mov p2 a endm ;;******************************** @clock macro mov a #0010b ;;set clk l ? h and h ? l or a p2state mov p2 a mov a #1101b and a p2state mov p2state a mov p2 a endm ;;******************************** @send_0 macro mov a #1110b ;;host send 0 ? dio and a p2state mov p2state a mov p2 a endm ;;******************************** @send_1 macro mov a #0001b ;;host send 1 ? dio or a p2state mov p2state a mov p2 a endm ;;******************************** @send macro data ; ;host send 1-bit const a nt (#1 or #0) ? dio mov tmp data mov a #1110b and a p2state or a tmp mov p2state a mov p2 a endm version: 1.5 july 31, 2003 16 ;;********************************
SNAD01C 8-channel 8-bit adc @read_dio macro ;;read dio ? a.0 (1-bit ) mov a p2 mov tmp #0001b and a tmp endm ;;******************************** @p20_out_mode macro ; ;swit ch all 4-bit of p2 t o out p ut mode mov a #0000b mov p2s a endm ;;******************************** @p20_in_mode macro ; ;swit ch p2.0 (dio) t o input mode mov a #0001b mov p2s a mov a #1110b and a p2state mov p2state a mov p2 a endm ;;************************************************************************** ;; set analog/digital mode to each channel (1:analog, 0:digital) * ;; y 7 ? ch7. y 6 ? ch6. y 5 ? ch5, ? * ;;************************************************************************** @set_attrib macro y 7 ,y 6,y 5 ,y 4,y 3 ,y 2,y 1 ,y 0 @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @s end_0 ;; send command (001) @clock @send_0 @clock @send_1 @clock @send y 7 ;; send y 7 t o y 0 @clock @send y 6 @clock @send y 5 @clock @send y 4 @clock @send y 3 @clock @send y 2 @clock @send y 1 @clock @send y 0 @clock @off_st art ;; set st art = 1 @p20_in_mode ;; swit ch p2.0 t o input mode endm version: 1.5 july 31, 2003 17
SNAD01C 8-channel 8-bit adc ;;************************************************************************* ;; set w a keup function enable/disable (1:enable, 0:disable) * ;; y 7 ? ch7. y 6 ? ch6. y 5 ? ch5, ? * ;;************************************************************************* @set_w akeup macro y 7 ,y 6,y 5 ,y 4,y 3 ,y 2,y 1 ,y 0 @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @s end_0 ;; send command (010) @clock @send_1 @clock @send_0 @clock @send y 7 ;; send y 7 t o y 0 @clock @send y 6 @clock @send y 5 @clock @send y 4 @clock @send y 3 @clock @send y 2 @clock @send y 1 @clock @send y 0 @clock @off_st art ;; set st art = 1 @p20_in_mode ;; swit ch p2.0 t o input mode endm ;;********************************************************************** ;; setup control register * ;; ph: pull-high register. pl:pull-low register. * ;; rf: bandgap reference enable * ;; mb: set 0 alw a y s * ;;********************************************************************** @set_control_reg macro ph,pl,rf,mb @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @s end_0 ;; send command (011) @clock @send_1 @clock @send_1 @clock @send ph ;; send ph, pl, rf, mb @clock @send pl @clock @send rf @clock @send mb @clock @off_st art ;; set st art = 1 @p20_in_mode ;; swit ch p2.0 t o input mode endm version: 1.5 july 31, 2003 18
SNAD01C 8-channel 8-bit adc ;;******************************************************************* ;; let SNAD01C enter pow e r-dow n mode 0 * ;;******************************************************************* @pow er_dow n_0 macro @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @s end_0 ;; send command (000) @clock @send_0 @clock @send_0 @clock @p20_in_mode ;; swit ch p2.0 t o input mode @clock @clock @clock @clock @cloc k @clock @clock @cloc k ;; SNAD01C ent e rs power-down at t h e 8-th clock edge. endm ;;***************************************************************** ;; let SNAD01C enter pow e r-dow n mode 1 * ;;***************************************************************** @pow er_dow n_1 macro @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @s end_1 ;; send command (111) @clock @send_1 @clock @send_1 @clock @p20_in_mode ;; swit ch p2.0 t o input mode @clock @clock @clock @clock @clock @clock @clock @cloc k ;; SNAD01C ent e rs power-down at t h e 8-th clock edge. endm ;;************************************************************************** ;; read adc from channel n (n= n2,n1,n0) ;; e.g.: ch 5 (n2, n1, n0= #1, #0, #1 ;; 8-bit data ? (ad_out_h, ad_out_l) ;; ad_out_h is bit7~ b it4 , ad_out_l is bit3~ b it0 ;;************************************************************************** @read_adc macro n0, n1, n2 @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @send_1 ;; send command (100) @clock @send_0 @clock @send_0 @clock @send n2 ;; send channel number @clock @send n1 @clock version: 1.5 july 31, 2003 19
SNAD01C 8-channel 8-bit adc @send n0 @clock @p20_in_mode ;; swit ch p2.0 t o input mode @clock ;; wait for 2 more clocks @clock mov ad_out_l #0 mov ad_out_h #0 ;;*************************************** @cloc k ;; read dio and save 1-bit dat a in ad_out_h.3 mov tmp1 #1000b @read_dio caje #0 @f mov a ad_out_h or a tmp1 mov ad_out_h a @@: ;;*************************************** @cloc k ;; read dio and save 1-bit dat a in ad_out_h.2 mov tmp1 #0100b @read_dio caje #0 @f mov a ad_out_h or a tmp1 mov ad_out_h a @@: ;;*************************************** @cloc k ;; read dio and save 1-bit dat a in ad_out_h.1 mov tmp1 #0010b @read_dio caje #0 @f mov a ad_out_h or a tmp1 mov ad_out_h a @@: ;;*************************************** @cloc k ; ; read dio and save 1-bit dat a in ad_out_h.0 mov tmp1 #0001b @read_dio caje #0 @f mov a ad_out_h or a tmp1 mov ad_out_h a @@: ;;*************************************** @cloc k ;; read dio and save 1-bit dat a in ad_out_l.3 mov tmp1 #1000b @read_dio caje #0 @f mov a ad_out_l or a tmp1 mov ad_out_l a @@: ;;*************************************** @cloc k ;; read dio and save 1-bit dat a in ad_out_l.2 mov tmp1 #0100b @read_dio caje #0 @f mov a ad_out_l or a tmp1 mov ad_out_l a version: 1.5 july 31, 2003 20
SNAD01C 8-channel 8-bit adc @@: ;;*************************************** @cloc k ;; read dio and save 1-bit dat a in ad_out_l.1 mov tmp1 #0010b @read_dio caje #0 @f mov a ad_out_l or a tmp1 mov ad_out_l a @@: ;;*************************************** @clock ; ; read dio and save 1-bit dat a in ad_out_l.0 mov tmp1 #0001b @read_dio caje #0 @f mov a ad_out_l or a tmp1 mov ad_out_l a @@: ;;*************************************** @clock @off_st art ;; set st art = 1 endm ;;***************************************************************** ;; read digital input: * ;; 8-bit data ? (port_h, port_l) * ;;***************************************************************** @read_port macro @p20_out_mode ;; swit ch p2 t o out p ut mode @on_st art ;; set st art = 0 @s end_1 ;; set command (101) @clock @send_0 @clock @send_1 @clock @p20_in_mode ;; swit ch p2.0 t o input mode mov port_l #0 mov port_h #0 ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_h.3 mov tmp1 #1000b @read_dio caje #0 @f mov a port_h or a tmp1 mov port_h a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_h.2 mov tmp1 #0100b @read_dio caje #0 @f mov a port_h or a tmp1 mov port_h a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_h.1 mov tmp1 #0010b @read_dio version: 1.5 july 31, 2003 21
SNAD01C 8-channel 8-bit adc caje #0 @f mov a port_h or a tmp1 mov port_h a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_h.0 mov tmp1 #0001b @read_dio caje #0 @f mov a port_h or a tmp1 mov port_h a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_l.3 mov tmp1 #1000b @read_dio caje #0 @f mov a port_l or a tmp1 mov port_l a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_l.2 mov tmp1 #0100b @read_dio caje #0 @f mov a port_l or a tmp1 mov port_l a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_l.1 mov tmp1 #0010b @read_dio caje #0 @f mov a port_l or a tmp1 mov port_l a @@: ;;*************************************** @clock ;; read dio and save 1-bit dat a in port_l.0 mov tmp1 #0001b @read_dio caje #0 @f mov a port_l or a tmp1 mov port_l a @@: ;;*************************************** @clock @off_st art ;; set st art = 1 endm ;;*************************************** version: 1.5 july 31, 2003 22
SNAD01C 8-channel 8-bit adc 9.1. program 1: set configuration of SNAD01C ;; setup configuration of SNAD01C ;; ;; w i th pull-low , use ?rf ? pin connected exte rnal voltage. (ph= 0, pl= 1 , rf = 0 ,mb= 1) ;; ;; ch7 ch6 ch5 ch4 ch3 ch2 ch1 ch0 ;; analog/digital: b a a d d d a a :b, battery detect ;; w a keup: x x x no yes yes x x ;; snc520 program include def.h st art : mov a #1111b mov p2s a mov a #0000b mov p2 a mov p2state #0 @set_control_reg #0, #1, #0, #1 ;; set control registers @set_attrib #0, #1, #1, #0, #0, #0, #1, #1 ;; set chan analog/digital @set_w akeup #0, #0, #0, #0, #1, #1, #0, #0 ;; setup w a keup function 9.2 . program 2: read adc result from channel 1 ;; inherit from program 1 ;; 8-bit adc result of channel 1 in ( ad_out_h, ad_out_l) ;; ad_out_h is bit7~ b it4, ad_out_l is bit3~ b it0 @read_adc #0, #0, #1 ;;get adc result from ch1 in ( ad_out_h, ad_out_l) ? ? 9.3. program 3: read digital input data from ch4, ch3, ch2 ;; inherit from program 1 ;; after reading, ;; port_h.0 = input of ch4 ;; port_l.3 = input of ch3 ;; port_l.2 = input of ch2 @read_port ;; 8-bit data ? (port_h, port_l) ? ? 9.4. program 4: pow e r-dow n SNAD01C and host, and wake-up ;; inherit from program 1 ;; enter pow e r-dow n mode (0) @set_control_reg #0, #1, #0, #0 ;; set control registers rf and mb is 0 @pow er_dow n_0 ;;SNAD01C enters pow er-dow n mode (0) end ;; host (snc520) enter pow er-dow n ? ? version: 1.5 july 31, 2003 23
SNAD01C 8-channel 8-bit adc trigger: @off_st art ;; set st art = 1 ? @read_port ;; read t r igger condition or debounce procedure starting from here ? ? 9.5. program 5: battery low detection snc520 SNAD01C start clk dio vdd avdd ref vss avss ch[7] vdd 0.1uf vdd vdd vdd vss p20 p21 p22 vdd battery: 1.5vx3 an application uses three 1.5v batteries for power supply. during operation, the power of batteries keeps consumed and the voltage of battery keeps going down. now, voltage lower than 3.6v is treated as ?battery low?. the adc and band-gap reference circuit in SNAD01C can be utilized to detect ?battery low?. the voltage through ch annel 7 to a dc is reduced to 1/6*v dd (figure10). thus, when vdd=3.6v, the voltage into adc is around 0.6v. and bandgap is chosen for reference voltage (approximat ely 1.17v within the whole operation voltage range). the value acquired from adc is about (0.6/1.17)*256=131. for simplification consideration, we choose ?adc?s readout < 128? as ?battery low? condition. version: 1.5 july 31, 2003 24
SNAD01C 8-channel 8-bit adc ;; inherit from program 1 ;; enter pow e r-dow n mode (0) checkbattery : @set_control_reg #0, #1, #1, #0 ;; set rf= 1 , turn-on bandgap @ s e t _ a t t r i b #1, #1, #1, #0, #0, #0, #1, #1 ;; sw itch ch7 to analog mov m15 #0 checkagain: @read_adc #1, #1, #1 ;; read ch7 mov a #1000b and a ad_out_h c a j e #1000b battery _low _ n o ;; if (value> = 128) then not battery low mov a m15 inca mov m15 a c a j e # 3 battery _low _ y e s ;; if (value< 128) for 3 times, then jmp checkagain ;; battery low . battery _low _yes: mov m14 #1 battery _low _no: @set_control_reg #0, #1, #0, #0 ;; set rf= 0 , turn-off bandgap @ s e t _ a t t r i b #0, #1, #1, #0, #0, #0, #1, #1 ;; sw itch ch7 to digital ;; t o save operating current version: 1.5 july 31, 2003 25
SNAD01C 8-channel 8-bit adc 10. p ad diagram no pad name x ( um) y(um) no pad name x ( um) y(um) 1 c h 0 - 6 2 3 . 5 0 3 5 2 . 5 0 9 v s s 6 2 3 . 5 0 - 4 1 7 . 5 0 2 c h 1 - 6 2 3 . 5 0 2 4 2 . 5 0 1 0 v d d 6 2 3 . 5 0 - 3 0 7 . 5 0 3 c h 2 - 6 2 3 . 5 0 1 3 2 . 5 0 1 1 d i o 6 2 3 . 5 0 - 1 9 7 . 5 0 4 c h 3 - 6 2 3 . 5 0 2 2 . 5 0 1 2 c l k 6 2 3 . 5 0 - 8 7 . 5 0 5 c h 4 - 6 2 3 . 5 0 - 8 7 . 5 0 1 3 s t a r t 6 2 3 . 5 0 2 2 . 5 0 6 c h 5 - 6 2 3 . 5 0 - 1 9 7 . 5 0 1 4 a v d d 6 2 3 . 5 0 1 3 2 . 5 0 7 c h 6 - 6 2 3 . 5 0 - 3 0 7 . 5 0 1 5 v s s 6 2 3 . 5 0 2 4 2 . 5 0 8 c h 7 - 6 2 3 . 5 0 - 4 1 7 . 5 0 1 6 r e f 6 2 3 . 5 0 3 5 2 . 5 0 ch0 ch1 ch2 ch3 ch4 ch5 ch6 ch7 1 2 10 vdd 11 dio 12 clk start 13 14 avdd 15 avss 16 ref 9 vss 3 4 5 6 7 8 (0,0) chip size=1350 x 950um SNAD01C note: the substrate must be c onnected to vss in pcb layout version: 1.5 july 31, 2003 26
SNAD01C 8-channel 8-bit adc version: 1.5 july 31, 2003 27 disclaimer the information appearing in sonix web pages (?this publicat ion?) is believed to be accurate. however, this publication could contain technical inaccuracies or typographical errors. the reader should not assume that this publication is e rror-free or that it will be suitable for any particular purpose. sonix makes no warr anty, express, statut ory implied or by description in this publication or other documents which are refe renced by or linked to this publication. in no event shall sonix be liabl e for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, including, without limitation, those resulting from loss of use, data or profits, whether or not advised of the possibility of damage, and on any theory of liability, arising out of or in connection with the use or performance of this publication or other documents which are referenced by or linked to this publication. this publication was developed for products offe red in taiwan. sonix may not offer the products discussed in this document in other c ountries. information is subject to change without notice. please contac t sonix or its local repres entative for information on offerings available. integrat ed circuits sold by sonix ar e covered by the warranty and patent indemnification provisions sti pulated in the terms of sale only. the application circuits illustrated in this do cument are for refere nce purposes only. sonix disclaims all warranties, including the warranty of merchantability or fitness for any purpo se. sonix reserv es the right to halt production or alter the specifications and prices , and discontinue marketing the products listed at any ti me without notice. accordingly, th e reader is cautioned to verify that the data sheets and othe r information in this publicati on are current before placing orders. products described herein are intended for use in normal commercial applications. applications involving unusual environmental or reliability requirem ents, e.g. military equipment or medical life s upport equipment, are specifically not recommended without additional processing by sonix for such application.


▲Up To Search▲   

 
Price & Availability of SNAD01C

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X